package com.project.service.impl;

import com.project.bean.EmployeeBean;
import com.project.dao.IEmployeeDao;
import com.project.service.IEmployeeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class EmployeeServiceImpl implements IEmployeeService {
    @Autowired
    private IEmployeeDao dao;
    @Override
    public List<EmployeeBean> findAll() {
        return dao.findAll();
    }

    @Override
    public void add(EmployeeBean em) {
        dao.add(em);
    }

    @Override
    public void update(Integer id, Integer money) {
        dao.update(id,money);
    }

    @Override
    public EmployeeBean findById(Integer id) {
        return dao.findById(id);
    }

    @Override
    public void dimission(Integer id) {
        dao.dimission(id,"离职");
    }
}
